package com.rc.saas.tenant.service.enterprise;


import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.common.exception.CustomException;
import com.rc.saas.tenant.common.vo.TResponse;
import com.rc.saas.tenant.mapper.enterprise.EnterpriseMemberApplyMapper;
import com.rc.saas.tenant.model.enterprise.EnterpriseMemberApply;
import com.rc.saas.tenant.model.enterprise.EnterpriseMemberApplyExample;
import com.rc.saas.tenant.model.tenant.TenantUser;
import com.rc.saas.tenant.search.enterprise.EnterpriseMemberApplySearch;
import com.rc.saas.tenant.vo.enterprise.EnterpriseMemberApplyResult;

import java.util.List;

/**
 * Created by sven on 2018-04-17
 */
public interface EnterpriseMemberApplyService extends BaseService<Long, EnterpriseMemberApply, EnterpriseMemberApplyExample, EnterpriseMemberApplyMapper> {

    PageInfo<EnterpriseMemberApplyResult> listPageEnterpriseMemberApply(EnterpriseMemberApplySearch search);

    TResponse saveApplyRecord(EnterpriseMemberApply enterpriseMemberApply, TenantUser user) throws CustomException;

    long countAllApply(String tenantCode);

    void saveEnterpriseApply(EnterpriseMemberApply enterpriseMemberApply);

    TResponse updateEnterpriseApplyForAudit(Long id, String status, String auditRemark);

    EnterpriseMemberApply selectByEnterpriseId(Long enterpriseId);

    void insertReturnId(EnterpriseMemberApply enterpriseMemberApply);

    List<EnterpriseMemberApply> getEnterpriseMemberApplys(Long enterpriseId);
}
